import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import axios from "axios"
import echarts from 'echarts';
Vue.prototype.$echarts = echarts;


Vue.config.productionTip = false

// axios.interceptors.request.use(function (config) {
//   // Do something before request is sent
//   //window.localStorage.getItem("accessToken") 获取token的value
//   let token = window.localStorage.getItem("token");
//   if (token) {
//     //将token放到请求头发送给服务器,将tokenkey放在请求头中
//     config.headers.Authorization = 'Bearer ' + token;
//     //也可以这种写法
//     // config.headers['accessToken'] = Token;
//   }
//   return config;
  
// }, function (error) {
//   // Do something with request error
//   return Promise.reject(error);
// });
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
